%{
#include <stdio.h>
int charc = 0, wordc = 0, linec = 0;
%}

NL \n
WS [ \t]+

%%

{WS} { charc += yyleng;
       wordc ++; }
{NL} { charc += yyleng;
       wordc ++;
       linec ++; }
.    { charc ++; }

%%

int main() {
  yylex();
  printf("%d %d %d\n", charc, wordc, linec);
}
